import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ball_lion/resources/styles.dart';
import 'package:ball_lion/module/home/news_list_view.dart';
import 'package:ball_lion/widgets/base/wqs_text.dart';

class NewsListPage extends StatefulWidget {
  const NewsListPage({Key? key}) : super(key: key);

  @override
  _NewsListPageState createState() => _NewsListPageState();
}

class _NewsListPageState extends State<NewsListPage> {
  late final String id;
  late final String pageTitle;

  @override
  void initState() {
    super.initState();
    id = Get.arguments ?? '';
    pageTitle = Get.parameters['title'] ?? '';
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: Styles.appBar(
        title: QsText(pageTitle),
      ),
      body: NewsListView(id: id),
    );
  }
}
